import redis
redis_con = redis.Redis(host='127.0.0.1',
                        port=6379, db=2, decode_responses=True)
redis_con1 = redis.Redis(host='192.168.1.9', password="xhhg123456", port=6379, db=2, decode_responses=True)

while redis_con.scard("协和端口查询"):
    sqh = redis_con.spop("协和端口查询").replace("ZL", '')
    redis_con1.sadd("协和端口查询", sqh)